package com.ms.game.lobby.db;

import java.util.Date;

import com.ms.player.Player;
import com.xpec.c4.db.dao.PlayerDAO;
import com.xpec.c4.service.module.task.TaskAsyncCommand;

public class UpdateLastLoginTimeAsync extends TaskAsyncCommand{
	private Player player;
	private Date currentTime;
	private String playerIP;
	private String platform;

	@Override
	public void asyncExecute() throws Exception {		
		PlayerDAO.updatePlayerLastLoginInfo(player, currentTime, playerIP, platform);
		
	}

	@Override
	public void execute() throws Exception {
		//沒任何事情做
	}
	
	public Player getPlayer() {
		return player;
	}

	public void setPlayer(Player player) {
		this.player = player;
	}

	public Date getCurrentTime() {
		return currentTime;
	}

	public void setCurrentTime(Date currentTime) {
		this.currentTime = currentTime;
	}

	public String getPlayerIP() {
		return playerIP;
	}

	public void setPlayerIP(String playerIP) {
		this.playerIP = playerIP;
	}

	public void setPlatform(String platform) {
		this.platform = platform;
	}
}
